package com.mk.es.service.transport.handler;

import com.mk.es.service.transport.entity.EsQueryResult;
import org.elasticsearch.action.search.SearchResponse;

/**
 * 处理ES查询结果 接口
 * @param <T>
 */
public interface EsSearchResponseHandler<T> {

    /**
     * 处理ES查询结果
     * @param response
     * @param clazz
     * @return
     * @throws IllegalAccessException
     * @throws InstantiationException
     */
    public EsQueryResult<T> handle(SearchResponse response, Class<T> clazz) throws IllegalAccessException, InstantiationException;

}
